//
//  FlagView.m
//  测试专用
//
//  Created by Joinwe on 15/12/22.
//  Copyright © 2015年 Joinwe. All rights reserved.
//

#import "FlagView.h"
#import "Flag.h"

@interface FlagView()

@property (weak, nonatomic) IBOutlet UILabel *FlagName;

@property (weak, nonatomic) IBOutlet UIImageView *FlagImage;

@end


@implementation FlagView

+ (instancetype)flagViewWithPickerView:(UIPickerView *)pickerView{
//    NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"FlagView" owner:nil options:nil];
//    return  array.lastObject;
    return  [[NSBundle mainBundle] loadNibNamed:@"FlagView" owner:nil options:nil].lastObject;
}

- (void)setFlag:(Flag *)flag{
    _flag = flag;
    
    self.FlagName.text = flag.bankName;
    self.FlagImage.image = [UIImage imageNamed:flag.bankIcon];
    
}


+(CGFloat)flagViewHeight{
    return 44;
}


@end
